package com.atguigu12.wapper.exer2;

/**
 * ClassName: InterviewTest
 * Package: com.atguigu12.wapper.exer2
 * Description:
 *
 * @Author ZY
 * @Create 17:09
 * @Version 1.0
 */
public class InterviewTest2 {
    public static void main(String[] args) {
        //题目1:
        int i = 10;
        double d = 10.2;
        System.out.println(i == d);//false

        // 题目2:
        Integer i1 = 10;
        Double d1 = 10.2;
//        System.out.println(i1 == d1);//编译报错

        //题目3:
        Integer m = 1000;
        double n = 1000;
        System.out.println(m == n);//true

        //题目4:
        Integer x = 1000;
        int y = 1000;
        System.out.println(x == y);//true

        /*
        * 当包装类与基本类型进行比较（如 ==、<、> 等）时，
        * 包装类会自动拆箱为对应的基本类型，再进行比较。
        * */

    }
}
